package ch.subgate.pongwars;

public class GameHelper {
	public static float getDICXFromSC(GameContext context, float scx) {
		return (scx - context.battlefieldLeft) / context.unitWidth;
	} // getDICXFromSC

    public static float getDICYFromSC(GameContext context, float scy) {
        return (scy - context.battlefieldTop) /context.unitWidth;
    } // getDICYFromSC
	
	public static float mirrorDirectionXAxis(float direction) {
		if (direction >= 0.0f) {
			direction = (float)Math.PI - direction;
		}
		else {
			direction = -(float)Math.PI - direction;
		}
		return direction;
	} // mirrorDirectionXAxis
} // GameHelper
